Skip blank lines in dat file with for loop in Python